﻿using Inovout.Organizations.Memberships.Models;
using Inovout.People.Memberships.Models;
using Inovout.Web.Mvc;
using System.Web.Mvc;

namespace Inovout.Account.Web.Controllers
{
    public class MeController : BaseController
    {
        public override ActionResult Index()
        {
            Inovout.Memberships.Models.Membership membership = base.Membership as Memberships.Models.Membership;
            if (membership.MembershipType.Equals(typeof(PersonMembership)))
            {
                return RedirectToAction("Edit", "Person");
            }
            else
            {
                return RedirectToAction("Edit", "Organization");
            }
        }
    }
}
